package jp.co.sn.mml.pojo.tmkrnd;


public class TmkrndId implements java.io.Serializable { 

	//年
	private Long year;
	//月
	private Long month;
	//休日
	private Long kyuD;

	/** default constructor */
	public TmkrndId(){

	}

	/** full constructor */
	public TmkrndId(Long year,Long month,Long kyuD){
		this.year = year;
		this.month = month;
		this.kyuD = kyuD;
	}

	//Property accessors
	public Long getYear(){
		return this.year;
	}

	public void setYear(Long year){
		this.year=year;
	}

	public Long getMonth(){
		return this.month;
	}

	public void setMonth(Long month){
		this.month=month;
	}

	public Long getKyuD(){
		return this.kyuD;
	}

	public void setKyuD(Long kyuD){
		this.kyuD=kyuD;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmkrndId))
			return false;

		TmkrndId castOther = (TmkrndId) other;

		return ((this.getYear() ==  castOther.getYear())
				||(this.getYear()!=null && castOther.getYear() !=null 
					&& castOther.getYear() !=null 
					&& this.getYear().equals(castOther.getYear())))
			&& ((this.getMonth() ==  castOther.getMonth())
				||(this.getMonth()!=null && castOther.getMonth() !=null 
					&& castOther.getMonth() !=null 
					&& this.getMonth().equals(castOther.getMonth())))
			&& ((this.getKyuD() ==  castOther.getKyuD())
				||(this.getKyuD()!=null && castOther.getKyuD() !=null 
					&& castOther.getKyuD() !=null 
					&& this.getKyuD().equals(castOther.getKyuD())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getYear() == null ? 0 : this.getYear().hashCode());
		result = 37 * result
				+ (getMonth() == null ? 0 : this.getMonth().hashCode());
		result = 37 * result
				+ (getKyuD() == null ? 0 : this.getKyuD().hashCode());
		return result;
	}

}